import Vue from 'vue';
import VueRouter from 'vue-router';

import Home from '../components/Home.vue';
import Chat from '../components/Chat.vue';


Vue.use(VueRouter);

//浏览器调试时的router
const router = new VueRouter({
    mode:'history',  //切换路径模式，编程history模式
	//滚动条滚动行为，不加这个默认就会记忆原来滚动条的位置
    routes: [
        {
            path:'/',
            redirect: '/msg/home'
        },{
            path:'/index.html',
            redirect: '/msg/home'
        },
        {
            path:'/msg/home',
            component: Home
        },{
            path:'/msg/chat',
            component: Chat
        },
        {
            path:'/msg/*',
            redirect: '/msg/home'
        }
    ]
});




export default router;